<template>
 <div>
 <input type="text" @keyup.enter = 'fn()'>
 </div>
</template>

<script>
 export default {
   
   data () {
     return {

     }
   },
   methods: {
    fn(){
        console.log('按回车键');
    }
   },
   
 }
</script>

<style scoped lang='less'>

</style>